package com.yicun.road.service.util;


/**
  * 自定义异常工具类
 * @author zhaozengeng
 * @date 2020-03-12 10:19
 */
public class CheckOutException extends RuntimeException
{
	private static final long serialVersionUID = 8403557393782692300L;
	
	/**
	  * 仅包含message, 没有cause, 也不记录栈异常, 性能最高
	 * @param msg
	 */
	public CheckOutException(String msg)
	{
		this(msg, false);
	}
	
	/**
	 * 包含message, 可指定是否记录异常
	* @param msg
	* @param recordStackTrace
	*/
	public CheckOutException(String msg, boolean recordStackTrace)
	{
		super(msg, null, false, recordStackTrace);
	}
	
	/**
	 * 包含message和cause, 会记录栈异常
	* @param msg
	* @param cause
	*/
	public CheckOutException(String msg, Throwable cause)
	{
		super(msg, cause, false, true);
	}

}
